Skip to content

NO SNOW: Fix DecFloat schema nullability when SQL simplifier is disabled#4239

Merged
sfc-gh-jrose merged 3 commits into
mainfrom
fix-decfloat-schema-nullability
May 28, 2026
Merged

NO SNOW: Fix DecFloat schema nullability when SQL simplifier is disabled#4239
sfc-gh-jrose merged 3 commits into
mainfrom
fix-decfloat-schema-nullability

Conversation

@sfc-gh-bkogan

@sfc-gh-bkogan sfc-gh-bkogan commented May 27, 2026

Copy link
Copy Markdown
Collaborator
  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-NNNNNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

    When SQL simplifier is disabled, Snowpark builds synthetic schema queries via schema_expression(). For non-null DecFloatType columns, that path used DECFLOAT '0', which Snowflake describes as nullable. That caused DecFloat arithmetic result columns (for example NEW_E in test_plus_basic) to be reported as nullable=True.

    This change uses 0 :: DECFLOAT for non-null DecFloat schema placeholders instead, matching other numeric types and preserving NOT NULL metadata in describe queries.

Use cast syntax for non-null DecFloat schema placeholders so describe queries preserve NOT NULL metadata.
@sfc-gh-bkogan sfc-gh-bkogan changed the title Fix DecFloat schema nullability when SQL simplifier is disabled NO SNOW: Fix DecFloat schema nullability when SQL simplifier is disabled May 27, 2026
@sfc-gh-bkogan sfc-gh-bkogan added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label May 27, 2026
DecFloatType is handled by the existing _NumericType branch.
@sfc-gh-bkogan sfc-gh-bkogan marked this pull request as ready for review May 27, 2026 20:49
@sfc-gh-bkogan sfc-gh-bkogan requested review from a team as code owners May 27, 2026 20:50
@codecov-commenter

codecov-commenter commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.40%. Comparing base (1253e7e) to head (4163b29).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4239      +/-   ##
==========================================
- Coverage   95.40%   95.40%   -0.01%     
==========================================
  Files         171      171              
  Lines       44205    44203       -2     
  Branches     7548     7547       -1     
==========================================
- Hits        42174    42172       -2     
  Misses       1247     1247              
  Partials      784      784              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sfc-gh-jrose sfc-gh-jrose enabled auto-merge (squash) May 28, 2026 01:01
@sfc-gh-jrose sfc-gh-jrose disabled auto-merge May 28, 2026 04:30
@sfc-gh-jrose sfc-gh-jrose merged commit 195e5e7 into main May 28, 2026
29 of 30 checks passed
@sfc-gh-jrose sfc-gh-jrose deleted the fix-decfloat-schema-nullability branch May 28, 2026 05:33
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants